﻿#pragma once
#include <unknwn.h>

// {12345678-1234-1234-1234-123456789ABC}
static const GUID CLSID_ExampleComponent = 
{ 0x12345678, 0x1234, 0x1234, { 0x12, 0x34, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc } };

// {22345678-1234-1234-1234-123456789ABC}
static const GUID IID_IExample = 
{ 0x22345678, 0x1234, 0x1234, { 0x12, 0x34, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc } };

// IExample 接口定义
DECLARE_INTERFACE_(IExample, IUnknown)
{
    STDMETHOD(QueryInterface)(REFIID riid, void** ppv) PURE;
    STDMETHOD_(ULONG, AddRef)() PURE;
    STDMETHOD_(ULONG, Release)() PURE;
    
    // 自定义方法
    STDMETHOD(Add)(int a, int b, int* result) PURE;
    STDMETHOD(GetMessage)(BSTR* message) PURE;
    STDMETHOD(SetMessage)(BSTR message) PURE;
};